package com.jlt.dao.sys;

import java.util.List;

import org.springframework.stereotype.Component;
import org.springside.modules.orm.hibernate.HibernateDao;

import com.jlt.entity.sys.Menu;

/**
 * 菜单对象的泛型DAO.
 * 
 * @author zhoutao
 */
@Component
public class MenuDao extends HibernateDao<Menu, Long> {

	public static final String QUERY_CHILD_MENU_HQL = "from Menu m where m.status ='A' and m.parentMenu.id = ?";

	/**
	 * 加载子菜单
	 */
	public List<Menu> loadChildMenus(Long parentId) {
		return find(QUERY_CHILD_MENU_HQL, parentId);
	}

}
